package com.corona.game.util;

import java.util.HashMap;
import java.util.Map;

/* loaded from: pokewilds.jar:com/pkmngen/game/util/Direction.class */
public enum Direction {
    UP(0),
    LEFT(2),
    DOWN(4),
    RIGHT(6),
    N(0),
    E(2),
    S(4),
    W(6),
    NE(1),
    SE(3),
    SW(5),
    NW(7);

    final int id;
    public static final Map<Integer, Direction> oppDirs = new HashMap();

    static {
        Direction[] values = values();
        for (Direction direction : values) {
            oppDirs.put(Integer.valueOf((direction.getValue() + 4) % 8), direction);
        }
    }

    Direction(int id) {
        this.id = id;
        init();
    }

    public Direction init() {
        System.out.println("constructor was called, hi there");
        System.out.println(this);
        return this;
    }

    public int getValue() {
        return this.id;
    }

    public boolean equals(Direction direction) {
        return getValue() == direction.getValue();
    }

    public Direction oppDir() {
        return oppDirs.get(Integer.valueOf(getValue()));
    }
}
